<%-- 
    Document   : viewStudents
    Created on : 11.02.2015, 23:07:05
    Author     : lui
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="design/style.css">
        <title>View Courses</title>
        
    </head>
    
   
<body>
    <div id="website">
        
        <div id="header">
        </div>
            
            <div id="navbar">
<ul>        
 <p><a href="home.jsp">View my activities </a></p>
 <p><a href="viewStudents.jsp">View students </a></p>
 <p><a href="viewUniversities.jsp">View universities </a></p>
 <p><a href="viewCourses.jsp">View courses </a></p>
 <p><a href="viewLearningAgreements.jsp">Learning Agreements </a></p>
 <p><a href="statistics.jsp">Statistics </a></p>
</ul>
            </div>
        
        <div id="menue">
             <div id="font">
                 
           <span style="font-family:Verdana">
          
            <h1>View courses</h1>
           </span>
               <br>
            
      
                <select>
                <option value="volvo">All</option>
                <option value="saab">Mathematics</option>
                <option value="opel">Social Studies</option>
                
             <form action="createStudent.jsp">
                    <input type="submit" value="Show courses">
                    </form>
                </select>
            
            <br> </br>
           <form action="createCourse.jsp">
                    <input type="submit" value="Create course">
                    <br>
                    </br>
                    </form>
              <br> </br>
             <c:import var="courseInfo" url="courseXML.xml"/>

                <x:parse xml="${courseInfo}" var="output"  />
     
                <table border="1">
                 <tr>
                  <td>Name</td>
                  <td>Type</td>
                  <td>Credit Points</td>
    </tr>
  <x:forEach var="courses" select="$output/Courses">
      <x:forEach var="course" select="$courses/Course">
     
    <tr>
        <td>
            <a href="createCourse.jsp"> <x:out select="$course/Coursename"/>&nbsp;</a>
        </td>
        <td>
           <x:out select="$course/CourseType"/>&nbsp; 
        </td>
        <td>
           <x:out select="$course/Creditpoints"/>&nbsp; 
        </td>
        
    </tr>
      </x:forEach>       
</x:forEach> 
</table>
      

            
                </div>

                   
            
            <br> </br>
          </div>
        
      
        
    </div>    
</body>

</html>
